Learn R Programming

arules (version 1.0-12)

[-methods: Methods for "[": Extraction or Subsetting in Package 'arules'

Description

Methods for "[", i.e., extraction or subsetting in package arules. Subsetting can be done by integers containing column/row numbers, vectors of logicals or strings containing parts of item labels.

Arguments

See Also

itemMatrix-class, itemsets-class, rules-class, transactions-class, tidLists-class

Examples

Run this code
data(Adult)
Adult

## select first 10 transactions
Adult[1:10]

## select first 10 items for first 100 transactions
Adult[1:100, 1:10]

## select the first 100 transactions for the items containing
## "income" or "age=Young" in their labels 
Adult[1:100, c("income=small", "income=large" ,"age=Young")]

Run the code above in your browser using DataLab